package org.gunn.camle.study;

import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;

/**
 * Created with IntelliJ IDEA.
 * User: yichaogeng
 * Date: 14-1-13
 * Time: 下午4:02
 * To change this template use File | Settings | File Templates.
 */
public class FileCopierWithCamel {
	public static void main(String[] args)  {
		CamelContext context = new DefaultCamelContext();
		try {
			context.addRoutes(new RouteBuilder() {
				@Override
				public void configure() throws Exception {
					from("file:data/inbox?noop=true").to("file:data/outbox");
				}
			});

			context.start();
			Thread.sleep(1000);
			context.stop();
		} catch (Exception e) {
			e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
		}


	}
}
